<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="http://cdn.bootcss.com/angular.js/1.3.0-beta.13/angular.js"></script>
	</head>

	<body>
	<div ng-app="app">
		<div ng-controller="FirstController">
			<h4>The simplest adding machine ever</h4>
			<button ng-click="add(1)" class="button">+1</button>
			<a ng-click="subtract(1)" class="button alert">-1</a>
			<h4>Current count: {{ counter }}</h4>
		</div>
		</div>
	</body>

</html>
<script>
	var app = angular.module('app', []);
	app.controller('FirstController',
	function($scope) {
		$scope.counter = 0;
		$scope.add = function(amount) {
			$scope.counter += amount;
		};
		$scope.subtract = function(amount) {
			$scope.counter -= amount;
		};
	});
</script>